<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>内敛表达式</title>
</head>
<!--可以将th:inline="text"写在body标签里-->
<body>
<div th:text="${data}"></div>

<h2>内敛文本：th:inline="text"</h2>
<div th:inline="text">
    数据：[[${data}]]
</div>
    outside数据：[[${data}]]

<h2>内敛脚本：th:inline="javascript</h2>
<!--必须要加th:inline="javascript"和[[]]才能取出数据-->
<script type="text/javascript" th:inline="javascript">
    function showData(){
        alert([[${data}]]);
    }
</script>
<button th:onclick="showData()">展示数据</button>
</body>
</html>